$NG.AllReady(function (page, { useAction, useBeforeClick, useValuesChange, useClick, useUpdateRow, subscribe, useUpdateRows }) {
    const mstform = $NG.getCmpApi("baseInfo")
    const dgrid1 = $NG.getCmpApi("")
    const getHeadValue = (str)=>mstform.getItem(str).getValue()

    useValuesChange(()=>{
        getProjectInfoByPhid()
    },"user_fbxmchsbh")

    function getProjectInfoByPhid(){
        const phid = getHeadValue("user_fbxmchsbh")
        if(!phid) return 
        $NG.execServer("getFblxInfoByChPhid",{phid},(res)=>{
            if(res.count == 0) return 
            const datas = JSON.parse(res.data)[0].extendObjects
            const arr = [
                {
                    key: 'user_fbxmlb',
                    value: datas.lxbh
                },
                {
                    key: 'user_xmblb',
                    value: datas.xmblb
                },
                {
                    key: 'user_fbxmmc',
                    value: datas.fbxmmc,
                },
                {
                    key: 'user_fbxmlb',
                    value: {
                        value:datas.fbxmlb_phid,
                        label:datas.fbxmlb_name
                    },
                },
                {
                    key: 'user_jkjsfs',
                    value: datas.jkjsfs,
                },
                {
                    key: 'user_jkjsfs',
                    value: datas.jkjsfs,
                },
                {
                    key: 'user_yjfbzje',
                    value: datas.yjfbzje,
                },
                {
                    key: 'user_ncydzbfs',
                    value: {
                        label:datas.ncydzbfs_name,
                        value:datas.ncydzbfs_phid
                    }
                },
            ]
            setHeadValues(arr)
            
        })
    }
        // 表头批量赋值
    function setHeadValues(arr) {
        arr.forEach(item => {
            mstform.getItem(item.key)?.setValue(item.value)
        })
    }
})